﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PaymentHelper.PaymentFlow.ModelTemplate;


namespace PaymentHelper.PaymentFlow.CommonHelper
{
    public static class ExtensionMethods
    {
        public static MethodModel ToPaymentInfoModel(this IPaymentMethod method)
        {
            return new MethodModel()
            {
                Fee = method.GetHandlingFee(),
                FriendlyName = method.Descriptor.FriendlyName,
                SystemName = method.Descriptor.SystemName,
                ShortDescription = method.Descriptor.Description
            };
        }
    }
}
